//
//  Multimedia ViewController.m
//  BaseTools
//
//  Created by 李挺哲 on 16/1/22.
//  Copyright © 2016年 ltz. All rights reserved.
//

#import "MultimediaViewController.h"
#import "VideoViewController.h"
#import "RecordViewController.h"
@interface MultimediaViewController ()<UITableViewDataSource,UITableViewDelegate>
{
    NSMutableArray *array;
    VideoViewController * videoVc;
    RecordViewController * recordVc;

}
@end

@implementation MultimediaViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    array=[NSMutableArray array];
    [array addObject:@"视频播放"];
    [array addObject:@"录音"];
    [array addObject:@"音频播放"];
    [array addObject:@"PDF文件展示"];
    videoVc=[[VideoViewController alloc] init];
    recordVc=[[RecordViewController alloc] init];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 1;
    
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    
    return array.count;
    
}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *reuseId = @"MultimediaTableViewCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseId];
    if (cell == nil) {
        cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseId];
    }
    cell.textLabel.textAlignment=NSTextAlignmentCenter;
    cell.textLabel.text=array[indexPath.row];
    return cell;
    
    
    
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    switch (indexPath.row) {
        case 0:

            [self.navigationController showViewController:videoVc sender:self];
            
            break;
            
        case 1:

            [self.navigationController showViewController:recordVc sender:self];
 
            
            break;
        case 2:
            

            
            
            
            break;
            
        case 3:
            
            break;
            
            
        default:
            
            break;
    }
    
}


@end
